package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AdvertisementConfigurationMapper;
import com.ruoyi.system.domain.AdvertisementConfiguration;
import com.ruoyi.system.service.IAdvertisementConfigurationService;

/**
 * abcd配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-02
 */
@Service
public class AdvertisementConfigurationServiceImpl implements IAdvertisementConfigurationService 
{
    @Autowired
    private AdvertisementConfigurationMapper advertisementConfigurationMapper;

    /**
     * 查询abcd配置
     * 
     * @param id abcd配置主键
     * @return abcd配置
     */
    @Override
    public AdvertisementConfiguration selectAdvertisementConfigurationById(Long id)
    {
        return advertisementConfigurationMapper.selectAdvertisementConfigurationById(id);
    }

    /**
     * 查询abcd配置列表
     * 
     * @param advertisementConfiguration abcd配置
     * @return abcd配置
     */
    @Override
    public List<AdvertisementConfiguration> selectAdvertisementConfigurationList(AdvertisementConfiguration advertisementConfiguration)
    {
        return advertisementConfigurationMapper.selectAdvertisementConfigurationList(advertisementConfiguration);
    }

    /**
     * 新增abcd配置
     * 
     * @param advertisementConfiguration abcd配置
     * @return 结果
     */
    @Override
    public int insertAdvertisementConfiguration(AdvertisementConfiguration advertisementConfiguration)
    {
        advertisementConfiguration.setCreateTime(DateUtils.getNowDate());
        return advertisementConfigurationMapper.insertAdvertisementConfiguration(advertisementConfiguration);
    }

    /**
     * 修改abcd配置
     * 
     * @param advertisementConfiguration abcd配置
     * @return 结果
     */
    @Override
    public int updateAdvertisementConfiguration(AdvertisementConfiguration advertisementConfiguration)
    {
        advertisementConfiguration.setUpdateTime(DateUtils.getNowDate());
        return advertisementConfigurationMapper.updateAdvertisementConfiguration(advertisementConfiguration);
    }

    /**
     * 批量删除abcd配置
     * 
     * @param ids 需要删除的abcd配置主键
     * @return 结果
     */
    @Override
    public int deleteAdvertisementConfigurationByIds(Long[] ids)
    {
        return advertisementConfigurationMapper.deleteAdvertisementConfigurationByIds(ids);
    }

    /**
     * 删除abcd配置信息
     * 
     * @param id abcd配置主键
     * @return 结果
     */
    @Override
    public int deleteAdvertisementConfigurationById(Long id)
    {
        return advertisementConfigurationMapper.deleteAdvertisementConfigurationById(id);
    }
}
